<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script>
		function commit(){
			var file=$("#fileFolder").val();
			if(file==''){
				$("#msg").text('请选择要上传的文件夹');
				return;
			}
			$("#fileUploadForm").submit();
		}
    </script>
</head>
<body>
	<form class="form-horizontal" role="form" id="fileUploadForm" action="http://localhost:8080/createFile" name="fileUploadForm" method="post" enctype="multipart/form-data">
	  <div class="form-group">
		<input id="fileFolder" name="files" type="file" webkitdirectory><span id="msg" style="color:#F00"></span>
	  </div>
	  <button type="button" class="btn btn-primary" id="subButton" onclick="commit()">Submit</button>
	</form>
</body>
</html>